1. Field of the Invention:
The present invention relates to an image data processing apparatus for extracting any desired data in N rows and N columns (N is an even number of 2 or more) in a real space from four sets of data in N rows and N columns in a real space which have been produced by processing each of four sets of data in N rows and N columns in a space of spatial frequencies for an inverse discrete cosine transform.
2. Description of the Prior Art
Compressing image data for transmission often employs the discrete cosine transform (hereinafter referred to as "DCT") of two-dimensional image data arrayed in 8 rows and 8 columns, and decoding compressed image data into original image data often employs the inverse discrete cosine transform (hereinafter referred to as "IDCT") of two-dimensional image data arrayed in 8 rows and 8 columns (see, for example, Japanese Laid-Open Patent Publication No. 62-61159). In reality, a real space is divided into a number of blocks each in the form of a matrix of 8 dots.times.8 dots, and each of the blocks is processed for a DCT, thereby determining DCT coefficients in a space of spatial frequencies. If it is assumed that a matrix of 8.times.8 image data in a real space with elements xi, j is indicated by X, a matrix of 8.times.8 DCT coefficients in a space of spatial frequencies with elements ci, j is indicated by C, and a transform matrix of 8 rows and 8 columns for a DCT is indicated by N, then the following equations (1) are satisfied for DCT, IDCT: EQU DCT: C=(1/4)NXN.sup.t, EQU IDCT: X=(1/4)N.sup.t CN (1).
The matrices N, X, C are defined as follows: ##STR1##
In the above equations (2), a=cos(.pi./16), .alpha.=cos(2.pi./16), b=cos(3.pi./16), c=cos(5.pi./16), .beta.=cos(6.pi./16), d=cos(7.pi./16), and the matrix N.sup.t is a matrix transposed from the matrix N. The DCT is a linear transform from the matrix X to the matrix C, and the IDCT is a linear transform from the matrix C to the matrix X.
Specifically, as shown in FIG. IA of the accompanying drawings, a real space is divided into a number of blocks each in the form of a matrix of 8 dots.times.8 dots, and the matrices of image data in 8 rows and 8 columns, which correspond to the respective blocks, are represented by X0, X1, X2, . . . , respectively. As shown in FIG. 1B of the accompanying drawings, a space of spatial frequencies, which corresponds to the real space shown in FIG. 1A, is divided into a number of blocks each in the form of a matrix of 8 dots.times.8 dots, the blocks corresponding to matrices Ci. Normally, the data of the matrices Ci are successively compressed and transmitted to a receiving side, in which the received matrices Ci are successively processed for an IDCT so that they are decoded into the original matrices Xi in the real space.
For image data compression according to a DCT with motion compensation, image data is produced by shifting image data of a preceding frame by a motion vector, the produced image data is subtracted from image data of a present frame, and the resultant image data is processed for a DCT. The processed image data is then compressed and transmitted to a receiving side. In the receiving side, the transmitted image data is processed for an IDCT so that it is decoded into the image data of the present frame. To the decoded image data of the present frame, there is added image data that has been produced by shifting the decoded image data of the preceding frame by the motion vector, thereby generating an original image in a real space. When the image data which is the difference between the image data of the preceding and present frames is thus processed for a DCT for image data compression, the efficiency of image data compression is further increased. For the receiving side to decode the image data that has been compressed according to a DCT with motion compensation, it is necessary to determine, as shown in FIG. 2, the image data of a block 2 (shown hatched) that is present in a position where one divided block of 8 dots.times.8 dots in a real space has been shifted by a motion vector 1.
FIG. 3 of the accompanying drawings shows a conventional image data processing apparatus for determining the image data of a block that is present in a position where a block has been shifted by a motion vector. As shown in FIG. 3, the image data processing apparatus comprises IDCT circuits 3A, 3B, 3C, 3D for effecting a two-dimensional 8.times.8 IDCT on input data, and a selector circuit 4 having four input terminals and one output terminal. Generally, a block present in a position where a block has been shifted by a motion block overlaps four blocks each composed of 8 dots.times.8 dots. It is assumed that the matrices corresponding to these four blocks are represented by Xa, Xb, Xc, Xd, and the matrices in a space of spatial frequencies that have been produced by effecting a DCT on the four matrices are represented by Ca, Cb, Cc, Cd, respectively. These matrices are related with respect to an IDCT according to the following equations (3): EQU Xa=(1/4)N.sup.t CaN EQU Xb=(1/4)N.sup.t CbN EQU Xc=(1/4)N.sup.t CcN EQU Xd=(1/4)N.sup.t CdN (3).
The first IDCT circuit 3A is supplied with the 64 elements ca0,0.about.ca7,7 (which are actually compressed) of the first matrix Ca on the receiving side. Likewise, the second, third, and fourth IDCT circuits 3B, 3C, 3D are supplied respectively with the 64 elements cb0,0.about.cb7,7 of the second matrix Cb on the receiving side, the 64 elements cc0,0.about.cc7,7 of the third matrix Cc on the receiving side, and the 64 elements cd0,0.about.cd7,7 of the fourth matrix Cd on the receiving side.
The first IDCT circuit 3A supplies the selector circuit 4 with the 64 elements xa0,0.about.xa7,7 of the first matrix Xa in a real space which has been produced by an IDCT. Similarly, the second, third, and fourth IDCT circuits 3B, 3C, 3D supply the selector circuit 4 respectively with the 64 elements xb0,0.about.xb7,7 of the second matrix Xb, the 64 elements xc0,0.about.xc7,7 of the third matrix Xc, and the 64 elements xd0,0.about.xd7,7 of the fourth matrix Xd. The selector circuit 4 selects 64 elements xf0,0.about.xf7,7 determined according to the motion vector, from the supplied (64.times.4) elements, and outputs the selected 64 elements xf0,0.about.xf7,7.
For example, it is assumed that the image data of the block 2 is to be determined. The block 2 overlaps four blocks each composed of 8 dots.times.8 dots. The matrices corresponding to these four blocks are represented by X8, X9, X13, X14, respectively, and the matrices in a space of spatial frequencies which correspond to the matrices X8, X9, X13, X14 are represented by C8, C9, C13, C14, respectively. On a receiving side, the 64 elements, which are compressed, of the matrices C8, C9, C13, C14 in a space of spatial frequencies are supplied to the respective IDCT circuits 3A, 3B, 3C, 3D, and the IDCT circuits 3A, 3B, 3C, 3D supply the 64 elements of the matrices X8, X9, X13, X14 in a real space to the selector circuit 4. The selector circuit 4 then selects and outputs the 64 elements of the 8.times.8 matrix that corresponds to the block 2.
Generally, a matrix processing circuit for processing serially inputted 8.times.8 matrices and serially outputting the produced matrix requires 8 multipliers, and the IDCT calculation according to the equation (1) contains two multiplications between matrices. Therefore, the conventional two-dimensional IDCT processing circuit requires 16 (=2.times.8) multipliers. Inasmuch as the conventional image data processing apparatus shown in FIG. 3 has four IDCT circuits, it requires a total of 64 (4.times.16) multipliers. Since the circuit scale of a multiplier is considerably larger than the circuit scale of an adder or a subtractor and also since the overall circuit scale of a processing circuit composed of multipliers is determined substantially depending on the number of the multipliers used, the conventional image data processing apparatus composed of plural IDCT circuits has been relatively large in overall circuit scale.